package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment("优惠活动表")
public class Promotion extends AutoIdBase {
    @Comment("活动名称")
    private String name;

    @Comment("满减门槛")
    private BigDecimal thresholdAmount;
    @Comment("满减金额")
    private BigDecimal reduceAmount;

    @Comment("公司负担比例")
    private BigDecimal companyShare;

    public Promotion(LocalDateTime createTime, String name, BigDecimal thresholdAmount, BigDecimal reduceAmount, BigDecimal companyShare) {
        super(createTime);
        this.name = name;
        this.thresholdAmount = thresholdAmount;
        this.reduceAmount = reduceAmount;
        this.companyShare = companyShare;
    }
}
